ObjectsCompat

open class ObjectsCompat(source)

This class consists of static utility methods for operating on objects.

Functions

Link copied to clipboard
open fun equals(@Nullable a: @Nullable Any, @Nullable b: @Nullable Any): Boolean
Returns true if the arguments are equal to each other and false otherwise.
Link copied to clipboard
open fun hash(values: @Nullable Array<Any>): Int
Generates a hash code for a sequence of input values.
Link copied to clipboard
open fun hashCode(@Nullable o: @Nullable Any): Int
Returns the hash code of a non-null argument and 0 for a null argument.
Link copied to clipboard
open fun <T> requireNonNull(@Nullable obj: @Nullable T): @NonNull T
Checks that the specified object reference is not null.
open fun <T> requireNonNull(@Nullable obj: @Nullable T, @NonNull message: @NonNull String): @NonNull T
Checks that the specified object reference is not null and throws a customized NullPointerException if it is.
Link copied to clipboard
@Nullable
open fun toString(@Nullable o: @Nullable Any, @Nullable nullDefault: @Nullable String): @Nullable String
Returns the result of calling toString on the first argument if the first argument is not null and returns the second argument otherwise.